home *** CD-ROM | disk | FTP | other *** search
/ Network CD 1 / Network CD.iso / ncomm / scripts / rxread3.ncomm < prev    next >
Text File  |  1993-03-06  |  879b  |  25 lines

  1. /* This is a very simple logon script for MBBS systems that demonstrates */
  2. /* the third way to wait for data: waiting for a string. This script could */
  3. /* of course be made a lot more advanced by using WAIT '0A'X and the */
  4. /* inactivity command (see readser2.ncomm). That way, you may even include */
  5. /* WHEN-style checking (like in the NComm script-language) by for example */
  6. /* using the ARexx lastpos() function... (searches for a pattern in string) */
  7.  
  8. username = "TORKEL LODBERG\n"
  9. password = "\p\n"
  10.  
  11. options results /* Turn on result codes */
  12.  
  13. address 'ncomm' /* Our port name */
  14.  
  15. inactivity 0    /* Wait forever */
  16.  
  17. wait "FIRST name"
  18. if RC == 20 then exit /* Exit if user selected quit NComm */
  19. send username
  20. wait "(dots will echo):"
  21. if RC == 20 then exit /* Exit if user selected quit NComm */
  22. send password
  23.  
  24. clearbuffer /* Release memory allocated by FIFO-buffer */
  25.